using DeZhen.CollaborationPlatform.Model.Common;
using DeZhen.CollaborationPlatform.Model.DTO.ApiCallLog;

namespace DeZhen.CollaborationPlatform.IService.ApiCallLog
{
    /// <summary>
    /// 接口调用日志服务接口
    /// </summary>
    public interface IApiCallLogService
    {
        /// <summary>
        /// 分页获取接口调用日志列表
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <returns>分页结果</returns>
        Task<PageResult<ApiCallLogDTO>> GetListToPageAsync(QueryApiCallLogPage param);

        /// <summary>
        /// 获取接口调用日志列表
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <returns>日志列表</returns>
        Task<List<ApiCallLogDTO>> GetListAsync(QueryApiCallLog param);

        /// <summary>
        /// 根据ID获取接口调用日志
        /// </summary>
        /// <param name="id">日志ID</param>
        /// <returns>日志DTO</returns>
        Task<ApiCallLogDTO> GetByIdAsync(long id);

        /// <summary>
        /// 新增接口调用日志
        /// </summary>
        /// <param name="input">新增参数</param>
        /// <returns>是否成功</returns>
        Task<long> AddAsync(ApiCallLogAdd input);

        /// <summary>
        /// 更新接口调用日志
        /// </summary>
        /// <param name="input">编辑参数</param>
        /// <returns>是否成功</returns>
        Task<bool> UpdateAsync(ApiCallLogEdit input);

        /// <summary>
        /// 删除接口调用日志
        /// </summary>
        /// <param name="id">日志ID</param>
        /// <returns></returns>
        Task DeleteAsync(long id);
    }
}